package com.yesjpt.web;

import com.yesjpt.serv.SmsServ;
import com.yesjpt.util.L;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/sms") // 上下文路径
public class SmsController {
	
	@Autowired private SmsServ smsServ;
	
	
	//小商家的短信发送
	@GetMapping("/send")
    public Object send(String phone, String content) {
		L.begin(new Throwable().getStackTrace()[0]);
    	return smsServ.sendMsg(phone, content);
    }
}
